import request from '@/utils/request'

export default {
  //条件分页课程查询的方法
  getCourseList(page, limit, searchObj) {
    return request({
      url: `/eduservice/coursefront/getFrontCourseList/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  //查询所有分类的方法
  getAllSubject() {
    return request({
      url: '/eduservice/subject/front/getAllSubject',
      method: 'get'
    })
  },
  //课程详情的方法
  getCourseInfo(id) {
    return request({
      url: '/eduservice/coursefront/getFrontCourseInfo/' + id,
      method: 'get'
    })
  },

  //课程评论方法
  getCommentInfo(page, limit, id) {
    return request({
      url: `/eduservice/educomment/showComment/${page}/${limit}/${id}`,
      method: "get"
    })
  },

  // 发布评论
  releaseCommentInfo(info){
    return request({
      url:"/eduservice/educomment/comment",
      method:"post",
      data:info
    })
  }


}
